#include<iostream>
#include<stdlib.h>
using namespace std;
extern char** environ;	//声明环境变量表

int main(){
  int pos = 0;
  //只打印5条
  while(environ[pos] && pos < 5)
  {
    cout << environ[pos++] << endl;
  }
  cout<<"MYPATH="<<getenv("MYPATH")<<endl;
  return 0;
}
